package com.neardrug.mapper;

import com.neardrug.entity.ExamplesInsert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ExamplesMapper {


    void insert(List<ExamplesInsert> examplesInsertList);


    @Select("select * from tb_examples where task_id=#{taskId}")
    @Results({
            @Result(property = "taskId",column = "task_id"),
            @Result(property = "fileName",column = "file_name"),
            @Result(property = "fileUrl",column = "file_url"),
            @Result(property = "exampleId",column = "example_Id"),
            @Result(property = "compoundId",column = "compound_id"),
            @Result(property = "intermediateName",column = "intermediate_name"),
            @Result(property = "compoundName",column = "compound_name"),
            @Result(property = "smiles",column = "smiles"),
            @Result(property = "referenceReactions",column = "reference_reactions"),
            @Result(property = "HNMR",column = "H_NMR"),
            @Result(property = "CNMR",column = "C_NMR"),
            @Result(property = "FNMR",column = "F_NMR"),
            @Result(property = "PNMR",column = "P_NMR"),
            @Result(property = "MS",column = "MS"),
            @Result(property = "IR",column = "IR"),
            @Result(property = "UV",column = "UV"),
            @Result(property = "Mp",column = "Mp"),
            @Result(property = "Rf",column = "Rf"),
            @Result(property = "AnalCalcd",column = "Anal_calcd"),
            @Result(property = "LCMS",column = "LC_MS"),
            @Result(property = "HPLC",column = "HPLC"),
            @Result(property = "EXAMPLELABEL",column = "EXAMPLE_LABEL"),
            @Result(property = "REACTIONPRODUCT",column = "REACTION_PRODUCT"),
            @Result(property = "STARINGMATERIAL",column = "STARING_CATALYST"),
            @Result(property = "REAGENTCATALYST",column = "REAGENT_CATALYST"),
            @Result(property = "SOLVENT",column = "SOLVENT"),
            @Result(property = "TIMES",column = "TIMES"),
            @Result(property = "TEMPERATURE",column = "TEMPERATURE"),
            @Result(property = "YIELDPERCENT",column = "YIELD_PERCENT"),
            @Result(property = "YIELDOTHER",column = "YIELD_OTHER"),
            @Result(property = "OTHERCOMPOUND",column = "OTHER_COMPOUND"),
            @Result(property = "stepId",column = "step_Id"),
            @Result(property = "stepCompound",column = "step_Compound"),
            @Result(property = "stepDesc",column = "step_Desc"),
            @Result(property = "proReferenceReactions",column = "pro_reference_reactions"),
            @Result(property = "proHNMR",column = "pro_H_NMR"),
            @Result(property = "proCNMR",column = "pro_C_NMR"),
            @Result(property = "proFNMR",column = "pro_F_NMR"),
            @Result(property = "proPNMR",column = "pro_P_NMR"),
            @Result(property = "proMS",column = "pro_MS"),
            @Result(property = "proIR",column = "pro_IR"),
            @Result(property = "proUV",column = "pro_UV"),
            @Result(property = "proMp",column = "pro_Mp"),
            @Result(property = "proRf",column = "pro_Rf"),
            @Result(property = "proAnalCalcd",column = "pro_Anal_calcd"),
            @Result(property = "proLCMS",column = "pro_LC_MS"),
            @Result(property = "proHPLC",column = "pro_HPLC"),
            @Result(property = "proEXAMPLELABEL",column = "pro_EXAMPLE_LABEL"),
            @Result(property = "proREACTIONPRODUCT",column = "pro_REACTION_PRODUCT"),
            @Result(property = "proSTARINGMATERIAL",column = "pro_STARING_MATERIAL"),
            @Result(property = "proREAGENTCATALYST",column = "pro_REAGENT_CATALYST"),
            @Result(property = "proSOLVENT",column = "pro_SOLVENT"),
            @Result(property = "proTIMES",column = "pro_TIMES"),
            @Result(property = "proTEMPERATURE",column = "pro_TEMPERATURE"),
            @Result(property = "proYIELDPERCENT",column = "pro_YIELD_PRECENT"),
            @Result(property = "proYIELDOTHER",column = "pro_YIELD_OTHER"),
            @Result(property = "proOTHERCOMPOUND",column = "pro_OTHER_COMPOUND"),

    })
    List<ExamplesInsert> selectAll(Integer taskId);
}
